<template>
	<div class="mine">
		<div class="box">
			<div class="hearderBox">
				<div class="hearderBoxIcon" @click="goBack">
					<img src="../../assets/images/fanhuijiantou.png" alt="">
				</div>
				VIP
				<div class="vipjilu" @click="goNextPage('/vipRecord')">
					{{$t('indexTitle.title169')}}
				</div>
			</div>
			<div class="proList">
				<div class="dengjiTi">
					{{$t('indexTitle.title168')}}
				</div>
				<div class="dengjiBox">
					<div class="dengjiBoxL">
						<div class="dengjiBoxLOne">
							{{$t('indexTitle.title169')}}
						</div>
						<div class="dengjiBoxLTow">
							{{$t('indexTitle.title125')}} 0
						</div>
						<div class="dengjiBoxLThree">
							青铜 III
						</div>
					</div>
					<div class="dengjiBoxR">
						<img src="../../assets/images/dengji.png" alt="">
					</div>
				</div>
				<div class="quanyiBox">
					<img src="../../assets/images/liwu.webp" alt="">
					{{$t('indexTitle.title170')}}
				</div>
				<div class="vipNavBox">
					<div class="vipNavBoxIt" @click="getSelVipLever('0')" :class="{vipNavBoxItTow:isShowVipLe==0}">
						<img src="../../assets/images/vipliang.png" alt="" v-if="isShowVipLe==0">
						<img src="../../assets/images/viphui.png" alt="" v-if="isShowVipLe==1">
						Ⅰ
					</div>
					<div class="vipNavBoxIt" @click="getSelVipLever('1')" :class="{vipNavBoxItTow:isShowVipLe==1}">
						<img src="../../assets/images/vipliang.png" alt="" v-if="isShowVipLe==1">
						<img src="../../assets/images/viphui.png" alt="" v-if="isShowVipLe==0">
						Ⅱ
					</div>
				</div>
				<div class="vipLeverBox">
					<div class="vipLeverBoxIt" v-for="it in 15" :key="it">
						<img src="../../assets/images/dengji.png" alt="">
					</div>
				</div>
				<div class="jinjiBox">
					<div class="jinjiBoxL">
						{{$t('indexTitle.title171')}}"青銅 III"{{$t('indexTitle.title172')}}
					</div>
					<div class="jinjiBoxR">
						{{$t('indexTitle.title173')}}
					</div>
				</div>
				<div class="jifenBoxTow" @click="getShowJifen" :class="{jifenBoxThree:isJIfenShow}">
					<div class="jifenBoxT">
						{{$t('indexTitle.title174')}}
					</div>
					<div class="jifenBoxC">
						<div class="jifenBoxCL">
							<span>0.00</span>/0.00
						</div>
						<div class="jifenBoxCR">
							{{$t('indexTitle.title175')}}
						</div>
					</div>
					<div class="jinjiLineBox">
						<div class="jinjiLineBoxTow">

						</div>
					</div>
				</div>
				<div class="gengduoBox" @click="getShowJifen" :class="{gengduoBoxTow:isJIfenShow}">
					{{$t('indexTitle.title167')}}
				</div>
				<div class="dengjiTi dengjiTiTow">
					{{$t('indexTitle.title176')}}
				</div>
				<div class="tequanBox">
					<div class="tequanBoxIt">
						<img src="../../assets/images/dengjijinji.webp" alt="">

						<div class="tequanBoxItTit">
							{{$t('indexTitle.title176')}}
						</div>
						<div class="tequanBoxItBut">
							{{$t('indexTitle.title177')}}
						</div>
					</div>
					<div class="tequanBoxIt">
						<img src="../../assets/images/shengridangao.webp" alt="">

						<div class="tequanBoxItTit">
							{{$t('indexTitle.title178')}}
						</div>
						<div class="tequanBoxItText">
							{{$t('indexTitle.title179')}}28
						</div>
					</div>
					<div class="tequanBoxIt">
						<img src="../../assets/images/dengjijinji.webp" alt="">
					
						<div class="tequanBoxItTit">
							{{$t('indexTitle.title306')}}
						</div>
						<div class="tequanBoxItText">
							{{info.fs_money}}
						</div>
						<div class="tequanBoxItButTow" @click="getlingqu">
							{{$t('indexTitle.title307')}}
						</div>
					</div>
				</div>
			</div>
		</div>
		<loadingFour :msgText="msgTextTow" v-if="isShowLoadingTeow" @closeGuanbiTow="closeGuanbi"></loadingFour>
		<!-- <div class="buttons">
			<img src="../../assets/images/xiaoxi.png" alt="" />
		</div> -->
	</div>
</template>

<script>
	import {
		userinfo,
		fsnow
	} from "../../utils/api.js"
	import loadingFour from '../../components/loadingFour.vue';
	export default {
		data() {
			return {
				isShowVipLe: 0,
				isJIfenShow: false,
				info:[],
				msgTextTow: "",
				isShowLoadingTeow: false

			}
		},
		components: {
			loadingFour
		},
		created() {},
		mounted() {
			this.getuserinfo()
		},
		methods: {
			closeGuanbi(e) {
				this.isShowLoadingTeow = false;
			},
			getuserinfo() {
				this.info = [];
				userinfo().then((res) => {
					if (res.status.errorCode == 0) {
						this.info = res.data
					} else if (res.status.errorCode == 401) {
						console.log('401')
					} else {
						// this.$message.error(res.status.msg);
						this.msgTextTow = res.status.msg;
						this.isShowLoadingTeow = true;
							setTimeout(()=>{
								this.isShowLoadingTeow = false;
							},2000)
						// this.$message({
						// 	showClose: true,
						// 	message: res.status.msg,
						// 	type: 'error'
						// });
					}
				}).catch((err) => {
					console.log(err, 'err')
				});
			},
			getlingqu(){
				fsnow().then((res) => {
					if (res.status.errorCode == 0) {
						this.getuserinfo()
					} else if (res.status.errorCode == 401) {
						console.log('401')
					} else {
						// this.$message.error(res.status.msg);
						this.msgTextTow = res.status.msg;
						this.isShowLoadingTeow = true;
							setTimeout(()=>{
								this.isShowLoadingTeow = false;
							},2000)
						// this.$message({
						// 	showClose: true,
						// 	message: res.status.msg,
						// 	type: 'error'
						// });
					}
				}).catch((err) => {
					console.log(err, 'err')
				});
			},
			getSelVipLever(num) {
				this.isShowVipLe = num;
			},
			getShowJifen() {
				this.isJIfenShow = !this.isJIfenShow;
			},
			goNextPage(page){
				this.$router.push(page)
			},
			goBack() {
				this.$router.go(-1)
			}
		}
	}
</script>

<style scoped>
	* {
		box-sizing: border-box;
	}

	.mine {
		height: 90vh;
		overflow-y: auto;
		overflow-x: hidden;
		padding-top: calc(constant(safe-area-inset-top) + 0px);
		padding-top: calc(env(safe-area-inset-top) + 0px);
		padding-bottom: calc(constant(safe-area-inset-bottom) + 85px);
		padding-bottom: calc(env(safe-area-inset-bottom) + 85px);
		box-sizing: border-box;
		position: fixed;
		z-index: 1;
		-webkit-overflow-scrolling: touch;
		width: 100%;
	}

	.box {
		background-color: #f9f9f9;
		display: flex;
		flex-direction: column;
		/* min-height: 100vh; */
	}

	.buttons {
		position: fixed;
		bottom: 10%;
		right: 10px;
		background-color: #99D2E3;
		width: 60px;
		height: 60px;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.buttons img {
		width: 32px;
		height: 32px;
	}


	.hearderBox {
		width: 100%;
		height: 45px;
		background-color: #fff;
		position: fixed;
		top: 0;
		font-weight: 300;
		line-height: 45px;
		text-align: center;
		font-size: 20px;
		color: #545658;
		box-shadow: inset 0 -1px 0 #ececec;
		left: 0;
		overflow: hidden;
		z-index: 99;
	}

	.hearderBoxIcon {
		width: 50px;
		position: fixed;
		top: 3px;
		left: 0px;
	}

	.hearderBoxIcon img {
		width: 20px;
		height: 20px;
	}

	.vipjilu {
		position: fixed;
		top: 0px;
		right: 10px;
		font-size: 13px;
		color: #545658;
	}

	.proList {
		width: 100%;
		padding: 55px 15px 0;
	}

	.dengjiTi {
		width: 100%;
		color: #545658;
		font-size: 16px;
		padding-bottom: 10px;
	}

	.dengjiBox {
		width: 100%;
		background: linear-gradient(135deg, #787878, #787878 50%, #878787 0, #787878);
		box-shadow: 0 3px 3px 0 rgba(0, 0, 0, .25), inset 0 -10px 25px #646464;
		border-radius: 5px;
		color: #fff;
		height: 150px;
		height: 100%;
		padding: 10px;
		display: flex;
		justify-content: space-between;
	}

	.dengjiBoxLOne {
		font-size: 12px;
	}

	.dengjiBoxLTow {
		font-size: 24px;
		font-weight: 800;
		text-shadow: 0 2px 0 rgba(0, 0, 0, .3);
	}

	.dengjiBoxLThree {
		font-size: 16px;
		font-weight: 400;
		overflow: hidden;
		padding: 0;
		text-overflow: ellipsis;
		text-shadow: 0 2px 0 rgba(0, 0, 0, .3);
		white-space: nowrap;
	}

	.dengjiBoxR {
		width: 130px;
		height: 130px;
	}

	.dengjiBoxR img {
		width: 100%;
		height: 100%;
	}

	.quanyiBox {
		width: 100%;
		height: 70px;
		border-radius: 5px;
		cursor: auto;
		margin-top: 15px;
		position: relative;
		text-align: center;
		line-height: 120px;
		font-size: 14px;
		font-weight: 400;
		color: #545658;
		background-color: #ffffff;
	}

	.quanyiBox img {
		width: 55px;
		height: 55px;
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		top: -10px;
	}

	.vipNavBox {
		width: 100%;
		display: flex;
		margin-top: 10px;
		align-items: center;
	}

	.vipNavBoxIt {
		width: 70px;
		height: 34px;
		align-items: center;
		border: 1px solid #888787;
		border-radius: 5px;
		color: #838383;
		display: flex;
		font-size: 18px;
		font-weight: 400;
		justify-content: center;
		margin-right: 15px;
		opacity: .5;
	}

	.vipNavBoxIt img {
		width: 30px;
		height: 30px;
		margin-right: 2px;
	}

	.vipNavBoxItTow {
		background-color: #fff;
		border: 1px solid #b5b5b5;
		color: #000;
		opacity: 1;
	}

	.vipLeverBox {
		width: 100%;
		overflow-x: scroll;
		display: flex;
		margin: 15px 0;
		align-items: center;
	}

	.vipLeverBoxIt {
		width: 67px;
		margin-right: 10px;
	}

	.vipLeverBoxIt img {
		width: 67px;
		height: 67px;
	}

	.jinjiBox {
		width: 100%;
		height: 40px;
		display: flex;
		align-items: center;
		padding: 0px 10px;
		justify-content: space-between;
		border: 1px solid #ececec;
		border-radius: 5px 5px 0px 0px;
	}

	.jinjiBoxL {
		font-weight: 400;
		color: #545658;
	}

	.jinjiBoxR {
		border: 1px solid #9ac143;
		color: #9ac143;
		border-radius: 100px;
		font-size: 12px;
		font-weight: 300;
		margin-left: 5px;
		padding: 4px 7px;
		white-space: nowrap;
	}

	.jifenBoxTow {
		width: 100%;
		height: 75px;
		display: block;
		padding: 7px 10px 10px;
		border: 1px solid #ececec;
		border-top: none;
		border-radius: 0px 0px 5px 5px;
	}

	.jifenBoxThree {
		display: none;
	}

	.jifenBoxT {
		color: #a0a3a5;
		font-size: 14px;
		padding: 5px 0;
	}

	.jifenBoxC {
		width: 100%;
		display: flex;
		align-items: center;
		font-size: 14px;
		font-weight: 400;
		color: #545658;
		justify-content: space-between;
	}

	.jifenBoxCL span {
		color: #ff9b00;
	}

	.jinjiLineBox {
		width: 100%;
		height: 5px;
		background-color: #838383;
		border-radius: 5px;
		margin-top: 3px;
	}

	.jinjiLineBoxTow {
		width: 100%;
		height: 5px;
		border-radius: 5px;
		background-color: #ff9b00 !important;
	}

	.gengduoBox {
		background-color: #e1e1e1;
		color: #838383;
		cursor: pointer;
		font-size: 14px;
		padding: 8px 15px;
		text-align: center;
		display: none;
	}

	.gengduoBoxTow {
		display: block;
	}

	.tequanBox {
		width: 100%;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.dengjiTiTow {
		margin-top: 15px;
	}

	.tequanBoxIt {
		align-items: center;
		background-color: #fff;
		border-radius: 5px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		padding: 10px;
		width: 49%;
		text-align: center;
		margin-bottom: 8px;
	}

	.tequanBoxIt img {
		width: 64px;
		height: 64px;
	}

	.tequanBoxItTit {
		font-weight: 400;
		line-height: 22px;
		margin: 8px 0;
		max-width: 150px;
		overflow: hidden;
		text-overflow: ellipsis;
		text-align: center;
		width: 100%;
	}

	.tequanBoxItBut {
		border-radius: 3px;
		width: 100%;
		color: #fff;
		font-size: 12px;
		height: inherit;
		padding: 3px 15px;
		background-color: #7240ff;
		cursor: not-allowed;
		opacity: .4;
	}
	.tequanBoxItButTow{
		border-radius: 3px;
		width: 100%;
		color: #fff;
		font-size: 12px;
		height: inherit;
		padding: 3px 15px;
		background-color: #7240ff;
		cursor: not-allowed;
	}
	.tequanBoxItText {
		border-radius: 3px;
		width: 100%;
		font-size: 12px;
		height: inherit;
		padding: 3px 15px;
		cursor: not-allowed;
		background: none;
		color: #7240ff;
		opacity: 1;
	}
	
</style>